import React from 'react';
import './build.css'
import { PageHeader } from 'antd';
import moment from 'moment';
import { DatePicker, Space , Select,Button,Input,Switch,TimePicker  } from 'antd';

//switch
function onChange(checked) {
    this.setState({
        istime: 'none'
    }
        
    
    )
      
  }

  //选择执行时间
function onChangetime(time, timeString) {
    console.log(time, timeString);
  }

class Build extends React.Component{
    constructor(props){
        super(props);
        this.state={
            istime:'block',
        };

    }

render(){
    return (
        <div>
            {/* -----------------------个人信息表单------------------------- */}
        <div className="build-main">
            {/* 个人信息表单 */}
        <div className="detail" >
            <PageHeader
    className="site-page-header"
    title="个人信息表单"
  />
        </div>
        <div>
        <div className="thing">
                <div>事件名称：</div>
                <Input placeholder="Basic usage" />
            </div>
        </div>
    
      

        </div>

        {/* -----------------------配置信息表单------------------------- */}
        <div className="build-main">
         
       

     {/* 配置信息表单 */}
        <div className="detail" >
            <PageHeader
    className="site-page-header"
    title="配置信息表单"
  />
        </div>

        <div>
        <div className="thing">
                <div>url名称：</div>
                <Input placeholder="Basic usage" />
            </div>
        </div>

        <div>
        <div className="thing">
                <div>method名称：</div>
                <Input placeholder="Basic usage" />
            </div>
        </div>
        <div className="switch">
        定时：<Switch defaultChecked onChange={onChange} />
        <div  style={{display: this.state.istime}}>
        <TimePicker
    onChangetime={onChangetime}
    defaultOpenValue={moment('00:00:00', 'HH:mm:ss')}
  />
        </div>
        </div>
       
        
        </div>
    
      {/* ----------------------------提交---------------------- */}
      <div className="build-main">
         
       

         {/* 提交表单 */}
            <div className="detail" >
                <PageHeader
        className="site-page-header"
        title="提交信息表单"
      />
            </div>

            <Button type="primary">提交</Button>
          
          </div>
    
         
      

        </div>


        
    )
}
 
 }

export default Build;